package com.yunyao.framework.service;

import com.yunyao.common.dto.ReconciliationDto;
import com.yunyao.common.dto.ReconciliationOrderDto;
import com.yunyao.common.dto.SpReconciliationDto;
import com.yunyao.common.dto.SpReconciliationOrderDto;
import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.framework.dto.spreconciliatioin.*;
import com.yunyao.framework.vo.reconciliation.ReconciliationMaterialCountVO;
import com.yunyao.framework.vo.reconciliation.ReconciliationOrderVO;
import com.yunyao.framework.vo.spreconciliation.SpReconciliationMaterialCountVO;
import com.yunyao.framework.vo.spreconciliation.SpReconciliationMaterialVO;
import com.yunyao.framework.vo.spreconciliation.SpReconciliationOrderVO;
import com.yunyao.framework.vo.spreconciliation.SpReconciliationPoSupplyVO;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.List;

public interface SpReconciliationOrderService {
    /**
     * 获取供应商对账材料列表
     * @param spReconciliationMaterialDto
     * @return
     */
    YResult<PageResult<SpReconciliationMaterialVO>> getSpReconciliationMaterialList(SpReconciliationMaterialDto spReconciliationMaterialDto);

    BigDecimal getBySupplyIdHistorySum(String bizId);

    /**
     * 保存供应商对账材料信息
     *
     * @param saveDto
     * @return
     */
    YResult<String> saveMaterialInfo(SpReconciliationMaterialSaveDto saveDto);

    /**
     * 删除供应商对账材料信息
     * @param deletedDto
     * @return
     */
    YResult<String> deletedMaterialInfo(SpReconciliationMaterialDeleteDto deletedDto);

    /**
     * 获取供应商对账验收清单列表
     * @param spReconciliationPoSupplyDto
     * @return
     */
    YResult<PageResult<SpReconciliationPoSupplyVO>> getSpReconciliationPoSupplyList(SpReconciliationPoSupplyDto spReconciliationPoSupplyDto);

    YResult<PageResult<SpReconciliationOrderVO>> getSpReconciliationPoSupplyList(SpReconciliationOrderDto spReconciliationOrderDto);

    /**
     * 供应商-根据合同id查询对账中的验收清单id
     *
     * @param contractId
     * @return
     */
    List<String> getSoSupply(@NotBlank String contractId);

    /**
     * 保存供应商对账验收清单信息
     *
     * @param saveDto
     * @return
     */
    YResult<String> savePoSupplyInfo(SpReconciliationPoSupplySaveDto saveDto);

    /**
     * 删除供应商对账验收清单信息
     * @param deletedDto
     * @return
     */
    YResult<String> deletedPoPupplyInfo(SpReconciliationPoSupplyDeletedDto deletedDto);

    YResult<SpReconciliationMaterialCountVO> getSpReconciliationMaterialCount(SpReconciliationDto spReconciliationDto);

}
